function addAccount() {
	if(!verifyInputField("realName,loginName,password,confirmPwd"))
		return ;
if(!checkLoginNameWeak("loginName"))
	return;

/**		
	if(!isEmail("email")){
	return ;
	}
	if(!isPhone("msisdn")){
		return ;
	}
**/	

	var password = $("#password").val();
	var confirmPwd = $("#confirmPwd").val();
	
	if(password.length <6){
		alertMsgAndFocus("密码最少6位，请确认！","#password");
		return ;
	}
	
	if(password != confirmPwd){
		alertMsgAndFocus("密码不一致，请确认！","#confirmPwd");
		return ;
	}
//验证帐号唯一性
var user = {
	loginName:$("#loginName").val(),
	realName:$("#realName").val(),
	password:$("#password").val()
	};
var loginName = {
	loginName:$("#loginName").val()
	};	
$.ajax({
	   type: "POST",
	   url: "usercenter/subaccounts/checkSubAccount",
	   dataType:"json",
	   data:JSON.stringify(loginName),
	   contentType:"application/json;charset=UTF-8",
	   success: function(data){
	   		if(data.result == true){
				alertMsg("登录帐号已存在！");
		   		}else{
		   		  $.ajax({
					   type: "POST",
					   url: "usercenter/subaccounts/add",
					   dataType:"json",
					   data:JSON.stringify(user),
					   contentType:"application/json;charset=UTF-8",
					   success: function(data){
					   		if(data.result == true){
					   			var dialog = art.dialog({
											title : '提示',
											content : "添加成功！",
											lock : true,
											drag : false,
											icon : 'succeed',
											ok : function() {
											window.location.href = getRootUrl()+"usercenter/subaccounts/list";
											}
									});
						   		}else{
						   			alertMsg("添加失败，"+data.result+"!");
						   		}
				   	   }
					});
		   			
		   		}
   	   }
	});
			
}
